<template>
	<div class="box_header">
		
        <slot></slot>
		<el-button v-if='this.$route.path!="/bill"' type="primary" @click="addnewsclick" >新增</el-button>
		<el-button v-if='showflag' type="primary" @click="search">查询</el-button>
		<el-button @click="refresh">刷新</el-button>
	</div>
</template>

<script>
	export default{
		props:{
			showflag: {
			      type: Boolean,
			      default: true
			    }
		},
		data(){
			return{
			}
		},
		methods:{
			addnewsclick(){
				this.$emit('addnewsclick', 'addnewsclick')
			},
			search(){
				this.$emit('search')
			},
			refresh(){
				this.$emit('refresh')
			}
		}
	}
</script>

<style lang="less" scoped>
	.box_header{
	    width: 100%;
	    background-color: #fff;
	    height: 10%;
		display: flex;
		padding: 0 0.5rem;
		align-items: center;
		box-sizing: border-box;
		border-radius: 0.1rem;
	}
</style>
